call "%VS2017%/vcvarsall.bat" x86
cd %~dp0
cl /MD /O2 /Ob2 /Oi /GL /Zi /c /DLUA_BUILD_AS_DLL *.c
ren lua.obj lua.o
ren luac.obj luac.o
link /DLL /LTCG /IMPLIB:lua51.lib /OUT:lua51.dll /DEBUG /PDB:lua51.pdb *.obj 
link /OUT:lua.exe lua.o lua51.lib 
lib /OUT:lua51-static.lib *.obj
link /OUT:luac.exe luac.o lua51-static.lib
del *.obj *.pdb *.o *.exp
pause